import React, {Fragment} from 'react';
import {PageHeader} from 'antd';

import './styles.less';

class FormContainer extends React.Component {
    constructor(props) {
        super(props);
    }

    itemRender(route) {
        return (
            <span>{route.breadcrumbName}</span>
        )
    }

    render() {
        const {children, title, description, breadcrumb} = this.props;
        return (
            <Fragment>
                <PageHeader
                    backIcon={false}
                    className="site-page-header"
                    onBack={() => null}
                    title={title}
                    breadcrumb={{
                        routes: breadcrumb.routes,
                        itemRender: this.itemRender
                    }}
                    footer={description}
                />
                <div className="form-content-wrapper">
                    <div className="form-content-container">
                        {children}
                    </div>
                </div>
            </Fragment>
        )
    }
}

export default FormContainer;